export default {
  props: {
    collectProps: {
      type: Object,
      default: () => ({
        type: 'table_value',
      }),
    },
  },

  computed: {
    /**
     * 表格信息收集
     * {
     *   "field": "string",
     *   "table_value": [
     *    [
     *       {}
     *    ]
     *   ]
      }
     * @return {*}
     */
    collectInfo () {
      if (!this.value || this.can_do) return null

      const { type } = this.collectProps

      return {
        field: this.id,
        [type]: [],
      }
    },
  },
}
